// pages/reason/reason.js
Page({

    /**
     * 页面的初始数据
     */
    data: {
        msg:'',
        id: '',
        name: ''
    },

    gotoReject(e){
      if(this.data.msg==''){
        wx.showToast({
          title: '请先输入拒绝理由',
          icon: 'none'
        })
      }else{
        wx.redirectTo({
          url: '/pages/project/reject/reject?reason='+this.data.msg+'&messageId='+this.data.id+'&name='+this.data.name,
        })
      }
    },
    gotoDetail(e){
        wx.redirectTo({
          url: '/pages/project/applicationInDetail/applicationInDetail?messageId='+this.data.id+'&status=0',
        })
    },

    input: function(e){
      this.setData({
        msg: e.detail.value,
      })
      // console.log(this.data.msg)
    },

    /**
     * 生命周期函数--监听页面加载
     */
    onLoad: function (options) {
      this.setData({
        id: options.messageId,
        name:options.name
      })
    },
})